[Special functions] Implement Bessel functions#2
Merged
shivasankarka merged 13 commits intomojomath:mainfrom Mar 4, 2026
Merged
[Special functions] Implement Bessel functions#2shivasankarka merged 13 commits intomojomath:mainfrom
shivasankarka merged 13 commits intomojomath:mainfrom
Conversation
Member
Author
Member
forfudan
approved these changes
Mar 4, 2026
Member
There was a problem hiding this comment.
@shivasankarka Thanks for this PR.
I made some adjustments and approved it.
- About using the SIMD with width. I understand that you want to work on some vectorized approach, but I think it might be a little bit pre-mature for at this stage. Currently we should focus on scalar calculation. The extension to vector should be based on NuMojo NDArray but not SIMD (which would also be the case of scipy which is based on numpy array). So I revert them to Float64 for now and let's do that in future with NuMojo. How do you think?
- About j1, you discuss the case of x > 10 but not x < -10, so I add abs to it.
- The i0e and 1ie in docstring example seem to be incorrect. I changed it.
- In
test_bessel_scipy, you seem to calculate all values twice, so I just extract them to the top and calculate them once. - In
y0,abs(x) < 8.0seems not needed, since you already treatedx < 0.0before, so I removed theabs().
forfudan
added a commit
that referenced
this pull request
Mar 5, 2026
This PR adds support for the following functions, - Bessel function of first and second kind ($J_0$, $J_1$, $Y_0$, $Y_1$). - Bessel function of first kind for order `n` ($J_n$). - Modified Bessel functions of the first kind and their scaled forms ($i_0, i_1, i_0e, i_1e$) --------- Co-authored-by: ShivaSankar <shivasankar.ka@gmail.com> Co-authored-by: ZHU Yuhao <dr.yuhao.zhu@outlook.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the following functions,
n(